<?php

class Khachhang extends CI_Controller{
    function __construct() {
        parent::__construct();
    }
    function khachhang_detail() {
        $MSKH=$this->input->post('MSKH');
        $PASS=$this->input->post('password');
        
        $this->load->model('khachhang_model');
        
        if ($this->khachhang_model->check($MSKH,$PASS)){
            $data['info']=$this->khachhang_model->load_by_id($MSKH)->row_array();
            echo $this->load->view('khachhang/khachhanginfo',$data,TRUE);
        }else{
            echo 'Khách hàng không tồn tại.....';
        }
    }
}

